package base.day17.api;

import java.util.Objects;

public class TestStudent {
    public static void main(String[] args) {
        Student student=new Student("zhangsan",18);
        Student student2=new Student("zhangsan",18);
        System.out.println(student==student2);
        System.out.println(student.equals(student2));

        String result= Objects.toString(student);
        System.out.println(result);
        System.out.println(student);

        student=null;
        String result2=Objects.toString(student,"随便写");
        System.out.println(result2);

        boolean result3=Objects.isNull(student);
        System.out.println(result3);

        boolean result4=Objects.nonNull(student);
        System.out.println(result4);
    }
}
